package com.sh.data.engine.domain.datadev.offline.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sh.data.engine.domain.datadev.offline.service.DatadevSubNodeDependencyService;
import com.sh.data.engine.repository.dao.datadev.DatadevSubNodeDependencyMapper;
import com.sh.data.engine.repository.dao.datadev.entity.DatadevSubNodeDependencyEntity;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DatadevSubNodeDependencyServiceImpl
    extends ServiceImpl<DatadevSubNodeDependencyMapper, DatadevSubNodeDependencyEntity>
    implements DatadevSubNodeDependencyService {

    @Override
    public List<DatadevSubNodeDependencyEntity> getDatadevSubNodeDepenDencyList(Long taskFlowId) {

        List<DatadevSubNodeDependencyEntity> subTaskList =
            list(
                new LambdaQueryWrapper<DatadevSubNodeDependencyEntity>()
                    .eq(DatadevSubNodeDependencyEntity::getTaskFlowId, taskFlowId)
                    .eq(DatadevSubNodeDependencyEntity::getRowState, 1));
        return subTaskList;
    }
}
